module.exports = {
  'apiGetLiveRoomBasicInfo': (data) => {
    const obj = {
      creator: {
        is_follow: false,
        avatar: 'http://cdn.mlzgldr.icu/meizanchen/new_user.png',
        username: '游客'
      },
      play_flv_url: '',
      is_play_back: false,
      record_video_url: '',
      record_video_thumb: '',
      net_url: 'http://cdn.mlzgldr.icu/meizanchen/play_waiting.jpeg',
      emergency_pic: 'http://cdn.mlzgldr.icu/meizanchen/play_waiting.jpeg',
      record_video_thumb: '',
      auto_pause: true,
      play_end: false,
      player_close_title: '',
      player_close_title: '',
      player_close_subtitle: '',
      is_show_fav_button: true,
      like_mode: 0,
      is_like: false,
      autoFav: true,
      live_room_like_icons: [
        'http://cdn.mlzgldr.icu/meizanchen/fav_1.png',
        'http://cdn.mlzgldr.icu/meizanchen/fav_2.png',
        'http://cdn.mlzgldr.icu/meizanchen/fav_3.png',
        'http://cdn.mlzgldr.icu/meizanchen/fav_4.png',
        'http://cdn.mlzgldr.icu/meizanchen/fav_5.png',
        'http://cdn.mlzgldr.icu/meizanchen/fav_6.png',
        'http://cdn.mlzgldr.icu/meizanchen/fav_7.png',
      ],
      is_show_coupon_button: true,
      coupon_click_action: { 
        type: 0, 
        icon: 'http://cdn.mlzgldr.icu/meizanchen/new_coupon_icon.png'
      },
      is_show_goods_button: true,
      product_click_action: {
        type: 0, 
        icon: 'http://cdn.mlzgldr.icu/meizanchen/new_product_btn.png'
      },
      is_show_share_button: true,
      is_show_power_list_button: true,
      is_show_register_member_rank: true,
      is_show_task_button: true,
      is_show_vote_button: true,
      vote_activity_id: 1,
      is_show_integral_button: true,
      show_ecs_user_register_btn: true,
      ecs_user_register_btn_title: '标题',
      is_show_live_room_faq_icon: true,
      trans_coding_template: [{
        template_name: '标清',
        title: '标清'
      }, {
        template_name: '高清',
        title: '高清'
      }, {
        template_name: '超高清',
        title: '超高清'
      }],
      websocketUrl: 'https://test.com',
      __loop_interval: 10000,
    }

    if (data.id === 1) { // 竖屏直播
      return {
        result: Object.assign(obj, {
          play_flv_url: 'http://cdn.mlzgldr.icu/meizanchen/shuping.mp4'
        })
      };
    } else if (data.id === 2) { // 横屏直播
      return {
        result: Object.assign(obj, {
          play_flv_url: 'http://cdn.mlzgldr.icu/meizanchen/hengping.mp4'
        })
      };
    } else if (data.id === 3) { // 竖屏回放
      return {
        result: Object.assign(obj, {
          is_play_back: true,
          record_video_url: 'http://cdn.mlzgldr.icu/meizanchen/playback2.mp4'
        })
      };
    } else if (data.id === 4) { // 横屏回放
      return {
        result: Object.assign(obj, {
          is_play_back: true,
          record_video_url: 'http://cdn.mlzgldr.icu/meizanchen/playback3.mp4'
        })
      };
    } else if (data.id === 11) { // 竖屏直播结束
      return {
        result: Object.assign(obj, {
          play_end: true,
          player_close_title: '直播已结束',
          player_close_subtitle: '敬请期待下次的直播'
        })
      }
    } else if (data.id === 12) { // 横屏直播结束
      return {
        result: Object.assign(obj, {
          play_end: true,
          player_close_title: '直播已结束',
          player_close_subtitle: '敬请期待下次的直播'
        })
      }
    } else if (data.id === 13) { // 竖屏红包雨
      return {
        result: Object.assign(obj, {
          play_flv_url: 'http://cdn.mlzgldr.icu/meizanchen/shuping.mp4'
        })
      };
    }  else if (data.id === 14) { 
      return {
        result: Object.assign(obj, {
          play_flv_url: 'http://cdn.mlzgldr.icu/meizanchen/shuping.mp4'
        })
      };
    }  else if (data.id === 15) { 
      return {
        result: Object.assign(obj, {
          play_flv_url: 'http://cdn.mlzgldr.icu/meizanchen/shuping.mp4'
        })
      };
    }  else if (data.id === 16) { 
      return {
        result: Object.assign(obj, {
          play_flv_url: 'http://cdn.mlzgldr.icu/meizanchen/shuping.mp4'
        })
      };
    } 
  },
  'apiGetLiveRoomStatsInfo': (data) => {
    const app = getApp();
    app.meizanchenLikeCount = app.meizanchenLikeCount || 1; // 假数据模拟人数变化
    return {
      result: {
        like_count: ++app.meizanchenLikeCount,
        user_count: 1456,
        __health_check_interval: 5000
      }
    };
  },
  'getRoomCoupon': (data) => {
    return {
      result: {
        coupon_list: [{
          name: '优惠券优惠券',
          description: '描述描述描述描述',
          discounts_money: '5',
          start_time: '2019-01-01',
          end_time: '2039-01-01'
        }, {
          name: '优惠券优惠券',
          description: '描述描述描述描述',
          discounts_money: '5',
          start_time: '2019-01-01',
          end_time: '2039-01-01'
        }, {
          name: '优惠券优惠券',
          description: '描述描述描述描述',
          discounts_money: '5',
          start_time: '2019-01-01',
          end_time: '2039-01-01'
        }, {
          name: '优惠券优惠券',
          description: '描述描述描述描述',
          discounts_money: '5',
          start_time: '2019-01-01',
          end_time: '2039-01-01'
        }, ],
        coupon_tabs: [{
          text: '说明说明说明说明'
        }]
      }
    }
  },
  'getRoomProduct': (data) => {
    return {
      result: {
        product_list: [{
          img_url: 'http://cdn.mlzgldr.icu/meizanchen/product_img.png'
        }, {
          cover_thumb: 'http://cdn.mlzgldr.icu/meizanchen/product_1.png',
          tags: ['商品标签'],
          title: '商品1商品1商品1',
          price: '100'
        }, {
          cover_thumb: 'http://cdn.mlzgldr.icu/meizanchen/product_2.png',
          tags: ['商品标签'],
          title: '商品1商品1商品1',
          price: '100'
        }, {
          cover_thumb: 'http://cdn.mlzgldr.icu/meizanchen/product_3.png',
          tags: ['商品标签'],
          title: '商品1商品1商品1',
          price: '100'
        }, {
          cover_thumb: 'http://cdn.mlzgldr.icu/meizanchen/product_4.png',
          tags: ['商品标签'],
          title: '商品1商品1商品1',
          price: '100'
        }, {
          cover_thumb: 'http://cdn.mlzgldr.icu/meizanchen/product_5.png',
          tags: ['商品标签'],
          title: '商品1商品1商品1',
          price: '100'
        }, {
          cover_thumb: 'http://cdn.mlzgldr.icu/meizanchen/product_6.png',
          tags: ['商品标签'],
          title: '商品1商品1商品1',
          price: '100'
        }, {
          cover_thumb: 'http://cdn.mlzgldr.icu/meizanchen/product_7.png',
          tags: ['商品标签'],
          title: '商品1商品1商品1',
          price: '100'
        }],
      }
    }
  },
  'getPrizeList': (data) => {
    return {
      result: {
        list: [{
          award_name: '奖品',
          title: '获奖标题获奖标题',
          winning_at: '2022-07-09',
          prize_state_text: '已领取'
        }, {
          award_name: '奖品',
          title: '获奖标题获奖标题',
          winning_at: '2022-07-09',
          prize_state_text: '领取',
          prize_type: 1,
          prize_state: 0
        }, {
          award_name: '奖品',
          title: '获奖标题获奖标题',
          winning_at: '2022-07-09',
          prize_state_text: '已领取'
        }, {
          award_name: '奖品',
          title: '获奖标题获奖标题',
          winning_at: '2022-07-09',
          prize_state_text: '领取',
          prize_type: 1,
          prize_state: 0
        }, {
          award_name: '奖品',
          title: '获奖标题获奖标题',
          winning_at: '2022-07-09',
          prize_state_text: '已领取'
        }, {
          award_name: '奖品',
          title: '获奖标题获奖标题',
          winning_at: '2022-07-09',
          prize_state_text: '领取',
          prize_type: 1,
          prize_state: 0
        }, ]
      }
    }
  },
  'getChatHistory': (data) => {
    return {
      result: {
        list: [{
          role: 2, 
          type: 2, 
          reply_nickname: '', 
          reply_content: '', 
          content: '历史记录1', 
          member_nickname: '用户1',
          tag: {
            text: '新客',
            style: {
              background: '#00968e',
              color: '#ffffff'
            }
          }
        }, {
          role: 2, 
          type: 2, 
          reply_nickname: '', 
          reply_content: '', 
          content: '历史记录2', 
          member_nickname: '用户1',
          tag: {
            text: '新客',
            style: {
              background: '#00968e',
              color: '#ffffff'
            }
          }
        }, {
          role: 1, 
          type: 1, 
          reply_nickname: '用户2', 
          reply_content: '历史记录3', 
          content: '历史记录1', 
          member_nickname: '用户1'
        }, {
          role: 2, 
          type: 2, 
          reply_nickname: '', 
          reply_content: '', 
          content: '我来了我来了', 
          member_nickname: '用户3',
          nicknameStyle: {
            color: '#c6488c'
          },
          tag: {
            text: '铁粉',
            style: {
              background: '#a64ede',
              color: '#ffffff'
            }
          }
        },]
      }
    }
  }
};